package com.itheima;

import java.util.Random;

public class sixgearray {
    public static void main(String[] args) {
        System.out.println("数组中元素与元素的和是：");
        int[] array = new int[6];
        Random r = new Random();
        int a = 0;
        for (int i = 0; i < array.length; i++) {
            array[i] = r.nextInt(100);
            System.out.print(array[i]+"+");
            a += array[i];
        }
        System.out.println("="+a);
    }


}

